Development Transactions

vFire has two Application Programming Interfaces (or APIs), which enable you to develop programs that automate many common vFire transactions. This section of the documentation deals with the Classic API. For more information on the RESTful Alemba API, introduced in 9.7, see here.

Development transactions are designed to allow API users to create external applications that use transactions not provided by the base API.

These transactions allow you to execute existing or customized queries.  It is up to the developer to ensure that the query exists, that the query is correct and that all required parameters are passed to the transaction.  See Define Custom Parameters for more information.

Three development transactions are provided:

  • ExecuteQueryAction: This can be used to execute a query that does not return results.  For example an update or delete statement.  The returned class will include the number of records affected by your transaction
  • ExecuteQuery: This is the same as ExecuteQueryAction except that it also returns a ResultSet object. See ResultSet for more information.
  • ExecuteAllocateRef: This transaction will use the internal vFire transactions for allocating unique refs.

The vFire data schema contains constraints. It is up to the developer running these development transactions to ensure that these constraints are met.  ExecuteQuery and ExecuteQueryAction will both return with an error if they are not.

ExecuteAllocateRef Transaction

The ExecuteAllocateRef transaction can be used to allocate a unique reference number using the SU_NUMBER_ALLOC table.

Input Parameters: AllocateRefRequest

Argument

Type

Mandatory

Default

Description

sID

String

No. See Transaction Login.

“”

Analyst’s current Session ID

sLoginUserID

String

No. See Transaction Login.

“”

Analyst’s Login ID

sLoginPassword

String

No. See Transaction Login.

“”

Analyst’s Password

sDatabase

String

No. See Transaction Login.

“”

Name of the vFire system for logging in.

sTableName

String

Yes

-

vFire 9.x Table Name

Return Values: AllocateRefResponse

Argument

Type

Description

nRef

Integer

Newly allocated unique ref for the specified table

sMessage

String

Error/Warning Message

Ret

APIReturn

Error/Warning Number

ExecuteQuery Transaction

The ExecuteQuery transaction can be used to execute a vFire query. It returns results in a vFire ResultSet.

Input Parameters: ExecuteQueryRequest

Argument

Type

Mandatory

Default

Description

sID

String

No. See Transaction Login.

“”

Analyst’s current Session ID

sLoginUserID

String

No. See Transaction Login.

“”

Analyst’s Login ID

sLoginPassword

String

No. See Transaction Login.

“”

Analyst’s Password

sDatabase

String

No. See Transaction Login.

“”

Name of the vFire system for logging in.

sQueryName

String

Yes

-

vFire 9.1 query name to execute

aCustomParameters

Array

No

“”

See Defining Custom Parameters.

Return Values: ExecuteQueryTableResponse

Argument

Type

Description

Ret

APIReturn

Error/Warning Number

sMessage

String

Error/Warning Message

ResultSet

DataSet

ResultSet containing attribute details

ExecuteQueryAction Transaction

The ExecuteQueryAction transaction can be used to manually run a query found in one of the query files. Parameters passed through to the query are passed to the transaction using the custom parameters. See Define Custom Parameters for more information.

Input Parameters: ExecuteQueryActionRequest

Argument

Type

Mandatory

Default

Description

sID

String

No. See Transaction Login.

“”

Analyst’s current Session ID

sLoginUserID

String

No. See Transaction Login.

“”

Analyst’s Login ID

sLoginPassword

String

No. See Transaction Login.

“”

Analyst’s Password

sDatabase

String

No. See Transaction Login.

“”

Name of the vFire system for logging in.

sQueryName

String

Yes

-

vFire 9.x query name to execute

aCustomParameters

Array

No

“”

See Defining Custom Parameters.

Return Values: ExecuteQueryIntResponse

Argument

Type

Description

nRecordsAffected

Integer

Number of records returned by the query.

sMessage

String

Error/Warning Message

Ret

APIReturn

Error/Warning Number